3.1.6 \(\int \frac {\sin (a+b \log (c x^n))}{x^3} \, dx\) [6]

Optimal. Leaf size=57 \[ -\frac {b n \cos \left (a+b \log \left (c x^n\right )\right )}{\left (4+b^2 n^2\right ) x^2}-\frac {2 \sin \left (a+b \log \left (c x^n\right )\right )}{\left (4+b^2 n^2\right ) x^2} \]

[Out]

-b*n*cos(a+b*ln(c*x^n))/(b^2*n^2+4)/x^2-2*sin(a+b*ln(c*x^n))/(b^2*n^2+4)/x^2

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {4573} \begin {gather*} -\frac {2 \sin \left (a+b \log \left (c x^n\right )\right )}{x^2 \left (b^2 n^2+4\right )}-\frac {b n \cos \left (a+b \log \left (c x^n\right )\right )}{x^2 \left (b^2 n^2+4\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sin[a + b*Log[c*x^n]]/x^3,x]

[Out]

-((b*n*Cos[a + b*Log[c*x^n]])/((4 + b^2*n^2)*x^2)) - (2*Sin[a + b*Log[c*x^n]])/((4 + b^2*n^2)*x^2)

Rule 4573

Int[((e_.)*(x_))^(m_.)*Sin[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)], x_Symbol] :> Simp[(m + 1)*(e*x)^(m +
1)*(Sin[d*(a + b*Log[c*x^n])]/(b^2*d^2*e*n^2 + e*(m + 1)^2)), x] - Simp[b*d*n*(e*x)^(m + 1)*(Cos[d*(a + b*Log[
c*x^n])]/(b^2*d^2*e*n^2 + e*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b^2*d^2*n^2 + (m + 1)^2,
 0]

Rubi steps

\begin {align*} \int \frac {\sin \left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx &=-\frac {b n \cos \left (a+b \log \left (c x^n\right )\right )}{\left (4+b^2 n^2\right ) x^2}-\frac {2 \sin \left (a+b \log \left (c x^n\right )\right )}{\left (4+b^2 n^2\right ) x^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.08, size = 44, normalized size = 0.77 \begin {gather*} -\frac {b n \cos \left (a+b \log \left (c x^n\right )\right )+2 \sin \left (a+b \log \left (c x^n\right )\right )}{\left (4+b^2 n^2\right ) x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + b*Log[c*x^n]]/x^3,x]

[Out]

-((b*n*Cos[a + b*Log[c*x^n]] + 2*Sin[a + b*Log[c*x^n]])/((4 + b^2*n^2)*x^2))

________________________________________________________________________________________

Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \frac {\sin \left (a +b \ln \left (c \,x^{n}\right )\right )}{x^{3}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a+b*ln(c*x^n))/x^3,x)

[Out]

int(sin(a+b*ln(c*x^n))/x^3,x)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 216 vs. \(2 (57) = 114\).
time = 0.29, size = 216, normalized size = 3.79 \begin {gather*} -\frac {{\left ({\left (b \cos \left (2 \, b \log \left (c\right )\right ) \cos \left (b \log \left (c\right )\right ) + b \sin \left (2 \, b \log \left (c\right )\right ) \sin \left (b \log \left (c\right )\right ) + b \cos \left (b \log \left (c\right )\right )\right )} n + 2 \, \cos \left (b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) - 2 \, \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (b \log \left (c\right )\right ) + 2 \, \sin \left (b \log \left (c\right )\right )\right )} \cos \left (b \log \left (x^{n}\right ) + a\right ) - {\left ({\left (b \cos \left (b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) - b \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (b \log \left (c\right )\right ) + b \sin \left (b \log \left (c\right )\right )\right )} n - 2 \, \cos \left (2 \, b \log \left (c\right )\right ) \cos \left (b \log \left (c\right )\right ) - 2 \, \sin \left (2 \, b \log \left (c\right )\right ) \sin \left (b \log \left (c\right )\right ) - 2 \, \cos \left (b \log \left (c\right )\right )\right )} \sin \left (b \log \left (x^{n}\right ) + a\right )}{2 \, {\left ({\left (b^{2} \cos \left (b \log \left (c\right )\right )^{2} + b^{2} \sin \left (b \log \left (c\right )\right )^{2}\right )} n^{2} + 4 \, \cos \left (b \log \left (c\right )\right )^{2} + 4 \, \sin \left (b \log \left (c\right )\right )^{2}\right )} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*log(c*x^n))/x^3,x, algorithm="maxima")

[Out]

-1/2*(((b*cos(2*b*log(c))*cos(b*log(c)) + b*sin(2*b*log(c))*sin(b*log(c)) + b*cos(b*log(c)))*n + 2*cos(b*log(c
))*sin(2*b*log(c)) - 2*cos(2*b*log(c))*sin(b*log(c)) + 2*sin(b*log(c)))*cos(b*log(x^n) + a) - ((b*cos(b*log(c)
)*sin(2*b*log(c)) - b*cos(2*b*log(c))*sin(b*log(c)) + b*sin(b*log(c)))*n - 2*cos(2*b*log(c))*cos(b*log(c)) - 2
*sin(2*b*log(c))*sin(b*log(c)) - 2*cos(b*log(c)))*sin(b*log(x^n) + a))/(((b^2*cos(b*log(c))^2 + b^2*sin(b*log(
c))^2)*n^2 + 4*cos(b*log(c))^2 + 4*sin(b*log(c))^2)*x^2)

________________________________________________________________________________________

Fricas [A]
time = 3.34, size = 46, normalized size = 0.81 \begin {gather*} -\frac {b n \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) + 2 \, \sin \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{{\left (b^{2} n^{2} + 4\right )} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*log(c*x^n))/x^3,x, algorithm="fricas")

[Out]

-(b*n*cos(b*n*log(x) + b*log(c) + a) + 2*sin(b*n*log(x) + b*log(c) + a))/((b^2*n^2 + 4)*x^2)

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 3.27, size = 228, normalized size = 4.00 \begin {gather*} \begin {cases} - \frac {\sin {\left (a - \frac {2 i \log {\left (c x^{n} \right )}}{n} \right )}}{4 x^{2}} + \frac {\log {\left (c x^{n} \right )} \sin {\left (a - \frac {2 i \log {\left (c x^{n} \right )}}{n} \right )}}{2 n x^{2}} - \frac {i \log {\left (c x^{n} \right )} \cos {\left (a - \frac {2 i \log {\left (c x^{n} \right )}}{n} \right )}}{2 n x^{2}} & \text {for}\: b = - \frac {2 i}{n} \\\frac {i \cos {\left (a + \frac {2 i \log {\left (c x^{n} \right )}}{n} \right )}}{4 x^{2}} + \frac {\log {\left (c x^{n} \right )} \sin {\left (a + \frac {2 i \log {\left (c x^{n} \right )}}{n} \right )}}{2 n x^{2}} + \frac {i \log {\left (c x^{n} \right )} \cos {\left (a + \frac {2 i \log {\left (c x^{n} \right )}}{n} \right )}}{2 n x^{2}} & \text {for}\: b = \frac {2 i}{n} \\- \frac {b n \cos {\left (a + b \log {\left (c x^{n} \right )} \right )}}{b^{2} n^{2} x^{2} + 4 x^{2}} - \frac {2 \sin {\left (a + b \log {\left (c x^{n} \right )} \right )}}{b^{2} n^{2} x^{2} + 4 x^{2}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*ln(c*x**n))/x**3,x)

[Out]

Piecewise((-sin(a - 2*I*log(c*x**n)/n)/(4*x**2) + log(c*x**n)*sin(a - 2*I*log(c*x**n)/n)/(2*n*x**2) - I*log(c*
x**n)*cos(a - 2*I*log(c*x**n)/n)/(2*n*x**2), Eq(b, -2*I/n)), (I*cos(a + 2*I*log(c*x**n)/n)/(4*x**2) + log(c*x*
*n)*sin(a + 2*I*log(c*x**n)/n)/(2*n*x**2) + I*log(c*x**n)*cos(a + 2*I*log(c*x**n)/n)/(2*n*x**2), Eq(b, 2*I/n))
, (-b*n*cos(a + b*log(c*x**n))/(b**2*n**2*x**2 + 4*x**2) - 2*sin(a + b*log(c*x**n))/(b**2*n**2*x**2 + 4*x**2),
 True))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*log(c*x^n))/x^3,x, algorithm="giac")

[Out]

integrate(sin(b*log(c*x^n) + a)/x^3, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {\sin \left (a+b\,\ln \left (c\,x^n\right )\right )}{x^3} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + b*log(c*x^n))/x^3,x)

[Out]

int(sin(a + b*log(c*x^n))/x^3, x)

________________________________________________________________________________________